package com.jeff.android.lab.jetpack.startup;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.startup.Initializer;

import com.jeff.utils.LogUtil;
import com.tencent.mmkv.MMKV;

import java.io.File;
import java.util.Collections;
import java.util.List;

/**
 * @author: dingfeng
 * @date: 2020-10-30
 * @since: 1.0.0
 **/
public class MMKVManagerInitializer implements Initializer {
    @NonNull
    @Override
    public Object create(@NonNull Context context) {
        final String dir = MMKV.initialize(context);

//        final String path = context.getExternalCacheDir() + File.separator + "mmkv_2";
//        final String dir = MMKV.initialize(path);

        LogUtil.d("dingfeng", "mmkv path:" + dir);
        return null;
    }

    @NonNull
    @Override
    public List<Class<? extends Initializer<?>>> dependencies() {
        return Collections.emptyList();
    }

}
